package com.kehutong.charge.app;

import org.coraframework.inject.Inject;
import org.coraframework.json.JSONObject;
import org.coraframework.mvc.MvcAction;
import org.coraframework.mvc.http.ReqMapping;
import org.coraframework.util.Objects;
import com.kehutong.charge.service.ChargeUrgingService;
import com.kehutong.common.errcode.Result;
import com.kehutong.common.util.Token;

/**
 * 企微端催缴控制器
 */
@MvcAction
@ReqMapping("/kht-bin/charges/urging")
public class ChargeUrgingAction {

    @Inject
    ChargeUrgingService chargeUrgingService;

    @ReqMapping("/page")
    public Object page(Token token, JSONObject jsonObject){
        if (Objects.isNull(token)) {
            return Result.error(0, "请先登录~");
        }

        jsonObject.put("employeeNo", token.getUuid());
        return chargeUrgingService.pageChargeUrgingEmployee(jsonObject);
    }

}
